-- Edited by Alundaio to fix insanely long respawn times and instead have low chance -- No reason to run check in update when there are hundreds of anomalies, would be better when they switch online class "se_zone_anom" (cse_anomalous_zone) function se_zone_anom:__init (section) super (section) end function se_zone_anom:on_register() cse_anomalous_zone.on_register(self) SendScriptCallback("server_entity_on_register",self,"se_zone_anom") end function se_zone_anom:update() cse_anomalous_zone.update(self) end function se_zone_anom:STATE_Write(packet) cse_anomalous_zone.STATE_Write(self, packet) end -- восстановление function se_zone_anom:STATE_Read( packet, size ) cse_anomalous_zone.STATE_Read( self, packet, size ) if editor() then return end end function se_zone_anom:on_unregister() SendScriptCallback("server_entity_on_unregister",self,"se_zone_anom") cse_anomalous_zone.on_unregister(self) end class "se_zone_torrid" (cse_torrid_zone) function se_zone_torrid:__init (section) super (section) end function se_zone_torrid:on_register() cse_torrid_zone.on_register(self) SendScriptCallback("server_entity_on_register",self,"se_zone_torrid") end function se_zone_torrid:update() cse_torrid_zone.update(self) end function se_zone_torrid:STATE_Write(packet) cse_torrid_zone.STATE_Write(self, packet) end -- восстановление function se_zone_torrid:STATE_Read( packet, size ) cse_torrid_zone.STATE_Read( self, packet, size ) if editor() then return end end function se_zone_torrid:on_unregister() SendScriptCallback("server_entity_on_unregister",self,"se_zone_torrid") cse_torrid_zone.on_unregister(self) end class "se_zone_visual" (cse_zone_visual) function se_zone_visual:__init (section) super (section) end function se_zone_visual:on_register() cse_zone_visual.on_register(self) SendScriptCallback("server_entity_on_register",self,"se_zone_visual") end function se_zone_visual:update() cse_zone_visual.update(self) end function se_zone_visual:STATE_Write(packet) cse_zone_visual.STATE_Write(self, packet) end function se_zone_visual:STATE_Read( packet, size ) cse_zone_visual.STATE_Read( self, packet, size ) if editor() then return end end function se_zone_visual:on_unregister() SendScriptCallback("server_entity_on_unregister",self,"se_zone_visual") cse_zone_visual.on_unregister(self) end --' Рестрикторы class "se_restrictor" (cse_alife_space_restrictor) function se_restrictor:__init (section) super (section) end local sr_teleport_ini = ini_file("sr_teleport_sections.ltx") function se_restrictor:on_register() cse_alife_space_restrictor.on_register(self) SendScriptCallback("server_entity_on_register",self,"se_restrictor") local id = self.id local name = self:name() if (sr_teleport_ini:section_exist(name)) then --[[local enable = sr_teleport_ini:line_exist(name,"enable") and sr_teleport_ini:r_string_ex(name,"enable") enable = enable and xr_logic.pick_section_from_condlist(db.actor,self,xr_logic.parse_condlist(self,"enable",name,enable)) if (enable == "true") then]] -- if (open_all_routes option is on) or (route is unlocked by default table) or (saved as true), then open the route if txr_routes.scan_route(name) or mlr_utils.load_var("routes_"..name) or (alife_storage_manager.get_state().opened_routes) then local spot = sr_teleport_ini:line_exist(name,"spot") and sr_teleport_ini:r_string_ex(name,"spot") if (spot and level.map_has_object_spot(id,spot) == 0) then local str = sr_teleport_ini:line_exist(name,"hint") and sr_teleport_ini:r_string_ex(name,"hint") str = str and game.translate_string(str) level.map_add_object_spot_ser(id,spot,str) end else -- close it local spot = sr_teleport_ini:line_exist(name,"spot") and sr_teleport_ini:r_string_ex(name,"spot") if (spot and level.map_has_object_spot(id,spot) ~= 0) then level.map_remove_object_spot(id,spot) end end end -- Alundaio end function se_restrictor:switch_online() cse_alife_space_restrictor.switch_online(self) end function se_restrictor:keep_saved_data_anyway() return true end function se_restrictor:on_unregister() SendScriptCallback("server_entity_on_unregister",self,"se_restrictor") cse_alife_space_restrictor.on_unregister(self) end